ubuntu磁盘扩容(lvm)卷 |
您所在的位置:网站首页 › vgextend ubuntu › ubuntu磁盘扩容(lvm)卷 |
百度一圈发现没有一个完整操作适合的教程就记录一下本次成功扩展磁盘的案例 在vmware workstation中对虚拟机进行磁盘扩容(注意,有快照的无法扩容,删除快照后扩展后,再创建快照避免操作失误导致数据没了) 第一步吧扩展后的磁盘空间新建 root@asus:~# fdisk /dev/sda Welcome to fdisk (util-linux 2.34). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. GPT PMBR size mismatch (62914559 != 167772159) will be corrected by write. The backup GPT table is not on the end of the device. This problem will be corrected by write. 输入N 新建,回车默认默认 Command (m for help): n Partition number (5-128, default 5): First sector (62914527-167772126, default 62914560): Last sector, +/-sectors or +/-size{K,M,G,T,P} (62914560-167772126, default 167772126): Created a new partition 5 of type 'Linux filesystem' and of size 50 GiB. 输入P查看结果 Command (m for help): p Disk /dev/sda: 80 GiB, 85899345920 bytes, 167772160 sectors Disk model: Virtual disk Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: gpt Disk identifier: A638BEC5-E54C-4232-AED0-3DB78ADA8443 Device Start End Sectors Size Type /dev/sda1 2048 1564671 1562624 763M EFI System /dev/sda2 1564672 4538367 2973696 1.4G Linux filesystem /dev/sda3 4538368 33552383 29014016 13.9G Linux filesystem /dev/sda4 33552384 62914526 29362143 14G Linux filesystem /dev/sda5 62914560 167772126 104857567 50G Linux filesystem 输入w保存 Command (m for help): w The partition table has been altered. Syncing disks. 查看LVM卷信息 root@asus:~# vgdisplay --- Volume group --- VG Name ubuntu-vg System ID Format lvm2 Metadata Areas 2 Metadata Sequence No 4 VG Access read/write VG Status resizable MAX LV 0 Cur LV 1 Open LV 1 Max PV 0 Cur PV 2 Act PV 2 VG Size |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |